package zhengjingli.rbac;
public class Cat {
    private String name;

    public Cat(String name) {
        this.name = name;
    }

    public void printlnfo() {
        System.out.println("小猫的名字是：" + name);
    }

    public void mew() {
        System.out.println(name + "喵喵喵");
    }

    public void eat(String food) {
        System.out.println(name + "在吃" + food);
    }

    public static void main(String[] args) {
        Cat tom = new Cat("Tom");
        Cat kitty = new Cat("Kitty");
        tom.eat("雪鱼又堡");
        kitty.mew();
        tom.printlnfo();
        kitty.printlnfo();
    }

}
